const express = require('express');
const noteRouter= require('./routes/noteRouter');
const noteApiRouter= require('./routes/noteApiRouter');


const ejs = require('ejs');

const app = express();

//中间件获取请求体数据
app.use(express.urlencoded({extended:false}))

// 配置模板
app.set('views',__dirname+'/html');
app.engine('html',ejs.renderFile);

app.use(noteRouter);
app.use(noteApiRouter);


app.listen(80,()=>{
    console.log("启动成功");
});